package com.fanqwz.hexieshe.data.API.wp;

import com.fanqwz.hexieshe.data.entity.wp.Taxonomy;
import com.fanqwz.hexieshe.data.entity.wp.Comment;
import com.fanqwz.hexieshe.data.entity.wp.Post;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by fanqw on 2017/3/12.
 */

public interface WPInterface {
    @GET("wp-json/posts/{id}")
    Call<Post> getPost(@Path("id") long id);

    @GET("wp-json/posts/{id}/comments")
    Call<List<Comment>> getComment(@Path("id") long id);

    @GET("wp-json/posts")
//    Call<List<Post>> getTopics(@Query("page") int page, @Query("filter[category_name]") String category, @Query("filter[tag") String tag);
    Call<List<Post>> getTopics(@Query("page") int page, @Query("filter[category_name]") String category, @Query("filter[tag]") String tag);

    @GET("wp-json/taxonomies/category/terms")
    Call<List<Taxonomy>> getCategorys();

}
